package com.irdstudio.apicenter.console.service.authenticate;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppDuty;
import com.irdstudio.apicenter.console.dm.AppDutyDao;

@Service(value = "appDutyService")
public class AppDutyService {

	@Autowired
	private AppDutyDao appDutyDao;

	public int insertOne(AppDuty appDuty) throws SQLException,
			ClassNotFoundException {
		return appDutyDao.saveAppDuty(appDuty);
	}

	public AppDuty queryAppDutyDetail(String appId, String appDutyId)
			throws SQLException {
		return appDutyDao.queryWithKeys(appId, appDutyId);
	}

	public int update(AppDuty appDuty) throws SQLException,
			ClassNotFoundException {
		return appDutyDao.update(appDuty);
	}

	public int delete(String appId, String appDutyId) throws SQLException {
		// TODO Auto-generated method stub
		return appDutyDao.delete(appId, appDutyId);
	}
}
